package com.glsc.ngateway.common.base.domainmapper;

import com.glsc.ngateway.common.base.domain.mysql.cmdb.CmdbDiskStandard;
import com.glsc.ngateway.common.base.dto.cmdb.CmdbDiskStandardImportDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface CmdbDiskStandardMapper {
    CmdbDiskStandardMapper INSTANCE = Mappers.getMapper(CmdbDiskStandardMapper.class);

    CmdbDiskStandardImportDto domain2dto(CmdbDiskStandard cmdbDiskStandard);

    List<CmdbDiskStandardImportDto> domain2dto(List<CmdbDiskStandard> cmdbDiskStandards);


    @Mapping(target = "id", ignore = true)
    @Mapping(target = "diskStandardCode", ignore = true)
    @Mapping(target = "isDelete", ignore = true)
    CmdbDiskStandard dto2domain(CmdbDiskStandardImportDto cmdbDiskStandardImportDto);

    List<CmdbDiskStandard> dto2domain(List<CmdbDiskStandardImportDto> cmdbDiskStandardImportDtos);

}
